--[[
     Created by IntelliJ IDEA.
     User: 毛凯
     Date: 2018/7/30
     Time: 9:38
     参数：ARGV[1]:活动id
     返回：返回数组：
           res [random,like,praised]
--]]
--记录活动红包以及人数key
local ACTINFOKEY = 'act_'..ARGV[1]
--记录初始化信息key
local ACTINITKEY = 'actInit_'..ARGV[1]

local res = {}


local random = tonumber(redis.call('hget',ACTINFOKEY,'randomRemaining')) or 0
local like = tonumber(redis.call('hget',ACTINFOKEY,'likeRemaining')) or 0
local praised = tonumber(redis.call('hget',ACTINFOKEY,'praisedRemaining')) or 0
table.insert(res,random)
table.insert(res,like)
table.insert(res,praised)
return res